const { defineConfig } = require('@vue/cli-service');
const path = require('path');

const resolve = (dir) => path.join(__dirname, dir);

module.exports = defineConfig({
  publicPath: process.env.NODE_ENV === 'production' ? '/dist' : '/',
  transpileDependencies: true,
  lintOnSave: 'error',
  css: {
    loaderOptions: {
      scss: {
        additionalData: '@import "~@/styles/imports.scss";',
      },
    },
  },
  configureWebpack: {
    resolve: {
      alias: { '@': resolve('src') },
    },
  },
});
